Skip to content

[core] Do not clean base and delta manifests in ChangelogDeletion#7429

Open
tsreaper wants to merge 3 commits intoapache:masterfrom
tsreaper:changelog-expire
Open

[core] Do not clean base and delta manifests in ChangelogDeletion#7429
tsreaper wants to merge 3 commits intoapache:masterfrom
tsreaper:changelog-expire

Conversation

@tsreaper
Copy link
Contributor

@tsreaper tsreaper commented Mar 16, 2026

Purpose

Currently, ChangelogDeletion will clean base and delta manifests. However these manifests are also cleaned in SnapshotDeletion.

Consider the following scenario:

  • snapshot-1 is changed to changelog-1. However due to some issue, its base and delta manifests are not cleaned.
  • snapshot-1 is changed to changelog-2. Its base and delta manifests are cleaned.
  • When expiring changelog-1, as changelog-2 has no manifests, all manifests in changelog-1 will be cleaned, even if they're still in use by later snapshots.

This PR fixes the bug by not cleaning base and delta manifests in ChangelogDeletion.

Tests

  • ChangelogExpireTest#testChangelogExpireWithUncleanedManifestLists.

API and Format

No format changes.

Documentation

No new feature.

@tsreaper tsreaper requested a review from Aitozi March 17, 2026 03:22
cleanUnusedManifestList(changelog.deltaManifestList(), skippingSet);
}
if (manifestList.exists(changelog.baseManifestList())) {
cleanUnusedManifestList(changelog.baseManifestList(), skippingSet);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why clean base here, it is very dangerous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants